//待处理的数据
let data = { 
  "id": 4860, 
  "uuid": "5e398eef-f5cf-4ff6-a000-c24913de86dd", 
  "hitokoto": "万有引力可无法对坠入爱河的人负责。", 
  "type": "a", 
  "from": "金木研", 
  "from_who": null, 
  "creator": "夕之树", 
  "creator_uid": 4248, 
  "reviewer": 4756, 
  "commit_from": "web", 
  "created_at": "1573331301", 
  "length": 22 
};

//导入 fs 模块
const fs = require('node:fs');// const fs = require('fs');

//写入文件
fs.writeFileSync('d:/data.json', JSON.stringify(data, null, 2));